//
//  ShouYeMainViewController.m
//  ShangChengMoBan
//
//  Created by 张铁军 on 16/8/13.
//  Copyright © 2016年 ping. All rights reserved.
//

#import "ShouYeMainViewController.h"
#import "SY_mainView.h"
#import "HuaFeiChongZhiViewController.h"  //充值
#import "MyPointViewController.h"//积分
#import "ManageViewController.h"//编辑地址
#import "YygFirstViewController.h"//一元购
#import "XXSPMainViewController.h"
#import "FaBiaoViewController.h"//发表
#import "DengLuViewController.h"
#import "SCHomeViewController.h"
#import "FanLiViewController.h"
#import "GuangGaoViewController.h"
#import "DLViewController.h"
#import "YveTXViewController.h"
@interface ShouYeMainViewController ()<ShouYeGongNengDelegate>
{
    RWScrollView *_myTbaleView;
    SY_mainView *_shouyeView;
    int page;
    int chaRuPage;
    
    int zongHuiYUanNUm;
    
    int _idNUM;
}
@end

@implementation ShouYeMainViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    zongHuiYUanNUm = 1000;
    page = 0;
    chaRuPage = 0;
    _idNUM = 0;
    // Do any additional setup after loading the view.
    //    self.edgesForExtendedLayout = UIRectEdgeTop;
    self.navigationController.automaticallyAdjustsScrollViewInsets = NO;
    [self drawView];


    if (![self jianCeLogin]) {
        DengLuViewController * deng = [[DengLuViewController alloc]init];
        [self.navigationController pushViewController:deng animated:YES];
    }
    //
    //    UIWebView *web = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenWidth)];
    //
    //    [web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.sky616.com"]]];
    //
    //    [self.view addSubview:web];
    //
    //
    //    UIButton *pao = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 100, 50)];
    //    pao.backgroundColor = [UIColor redColor];
    //    [pao addTarget:self action:@selector(paoBtn) forControlEvents:UIControlEventTouchUpInside];
    //    [self.view addSubview:pao];
    //
    
//    [self ceShiView]; //收集
    
    
    
    //    [self chaXUnSHuJUKu];
    
}

-(void)chaXUnSHuJUKu{
    
    //    NSMutableDictionary *shujuic = [[NSMutableDictionary alloc]init];
    //    FMResultSet *base = [DBDaoHelper selectDataWithSql:@"select * from airStations"];
    //
    //    while (base.next) {
    //
    //
    //
    //        NSMutableDictionary *danshujuic = [[NSMutableDictionary alloc]init];
    //
    //        [danshujuic setObject:[base stringForColumn:@"pno"] forKey:@"pno"];
    //        [danshujuic setObject:[base stringForColumn:@"left_orders"] forKey:@"left_orders"];
    //        [danshujuic setObject:[base stringForColumn:@"right_orders"] forKey:@"right_orders"];
    //        [self requestTjRDATA:danshujuic];
    //
    //        sleep(100);
    //
    //
    //    }
    //
    
}


-(void)paoBtn{
    
//https://www.sky616.com/sky.php?doAction=act_leftquery&user=83&leftorright=0
    [self qingQiuTuPU];
}

-(void)qingQiuTuPU{
    NSMutableDictionary *reques = [[NSMutableDictionary alloc]init];
    [reques setObject:@"act_leftquery" forKey:@"doAction"];
    [reques setObject:@"0" forKey:@"leftorright"];
    [NetWorking NEWjieKouQingQiu:@"sky.php" ANDIP:@"www.sky616.com" And:reques anBlock:^(NSDictionary *dic, NSError *error) {
//        [self startPainting];
    }];
    
}
-(void)ceShiView{
    
    if ([DBDaoHelper createTableWithSql:@"create table airStations(_id text,add_date text,alipay text,bank_name text,bank_no text,ccode text,circulation_point text,clanguage text,diqu text,dividend_point text,dljj text,dquyu text,electron_point text,email text,fxjj text,id text,jdr text,jhb text,jscore text,keeping_point text,left_orders text,leftnum text,mall_point text,name text,pno text,pnum text,pstate text,real_name text,register_count text,register_point text,register_type text,reward_point text,right_orders text,rightnum text,sky_point text,slevel text,slevel1 text,slevelid text,sxnum text,tc text,tc1 text,tel text,tgjj text,tjr text,wechat text,xfje text,xwnum text,zgq text,ztjj text,ztnum text,zwnum text)"]){
        
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *documentDirectory = [paths objectAtIndex:0];
        //    NSLog(@"%@",documentDirectory);
        //dbPath： 数据库路径，在Document中。
        NSString *dbPath = [documentDirectory stringByAppendingPathComponent:@"data.db"];
        NSLog(@"++++++%@",dbPath);
        
    }
    
    [DBDaoHelper createTableWithSql:@"create table guanxibiao(meID text,zuoYU text,youYU text,zuoId text,youID text)"];
    
    [DBDaoHelper createTableWithSql:@"create table ziZhangHuInfo(fatherID text,meID text,FatherZZH_type text)"];
    
    
    NSMutableDictionary *request = [[NSMutableDictionary alloc]init];
    [request setObject:@"act_login" forKey:@"doAction"];
    [request setObject:@"gszen01" forKey:@"staffCode"];
    [request setObject:@"chnj,hz@qq9968" forKey:@"password"];
    
    [NetWorking NEWjieKouQingQiu:@"enjoyLast/manager.php" ANDIP:@"www.sky616.com:81" And:request anBlock:^(NSDictionary *dic, NSError *error) {
        
        //        [self dingShiQingQiu];
        
        [self startPainting];
        
        
    }];
    
}

//-(void)dingShiQingQiu{
//    NSTimer *timer =  [NSTimer timerWithTimeInterval:1 target:self selector:@selector(request2) userInfo:nil repeats:YES];
//    
//    [timer fire];
//}

-(void)request2{
    
    NSMutableDictionary *request1 = [[NSMutableDictionary alloc]init];
    [request1 setObject:@"act_find" forKey:@"doAction"];
    [request1 setObject:[NSString stringWithFormat:@"%d",page] forKey:@"page"];
    [request1 setObject:@"1" forKey:@"rows"];
    [request1 setObject:@"" forKey:@"clanguage"];
    [request1 setObject:@"" forKey:@"real_name"];
    [request1 setObject:@"" forKey:@"tc"];
    [request1 setObject:@"" forKey:@"end"];
    [request1 setObject:@"" forKey:@"start"];
    [request1 setObject:@"" forKey:@"tel"];
    [request1 setObject:@"" forKey:@"pnum"];
    [request1 setObject:@"" forKey:@"name"];
    [request1 setObject:@"" forKey:@"jdr"];
    [request1 setObject:@"" forKey:@"tjr"];
    [request1 setObject:@"" forKey:@"id"];
    [request1 setObject:@"" forKey:@"dquyu"];
    
    if (page %1000 ==0) {
         NSLog(@"第%d次__",page);
    }
    
    
    [NetWorking NEWjieKouQingQiu:@"enjoyLast/manager.php" ANDIP:@"www.sky616.com:81" And:request1 anBlock:^(NSDictionary *dic, NSError *error){
        
        if (error != nil) {
            
            UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"提示" message: [NSString stringWithFormat:@"出错页数%d",page] delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
            [alertView show];
            [self request2];
            
        }else{
            
            if (dic != nil) {
                NSArray *shujuAry = [dic objectForKey:@"rows"];
                zongHuiYUanNUm = [[dic objectForKey:@"total"]intValue] ;
                
                if(page> zongHuiYUanNUm){
                    if(shujuAry.count == 0 ){
                        UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"提示" message:@"已完成" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
                        [alertView show];
                        
                        sleep(1000000000);
                        
                        return;
                        
                    }
                }
                ////
                for (int i = 0; i < shujuAry.count; i ++) {
                    NSDictionary *shujuDic = [shujuAry objectAtIndex:i];
                    
                    
                    [self requestTjRDATA:shujuDic];
                    
                    [DBDaoHelper updateTableData:[NSString stringWithFormat:@"INSERT OR REPLACE INTO airStations(_id,add_date,alipay,bank_name,bank_no,ccode,circulation_point,clanguage,diqu,dividend_point,dljj,dquyu,electron_point,email,fxjj,id,jdr,jhb,jscore,keeping_point,left_orders,leftnum,mall_point,name,pno,pnum,pstate,real_name,register_count,register_point,register_type,reward_point,right_orders,rightnum,sky_point,slevel,slevel1,slevelid,sxnum,tc,tc1,tel,tgjj,tjr,wechat,xfje,xwnum,zgq,ztjj,ztnum,zwnum) VALUES('%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%@')",[NSString stringWithFormat:@"%d",_idNUM],[shujuDic objectForKey:@"add_date"],[shujuDic objectForKey:@"alipay"],[shujuDic objectForKey:@"bank_name"],[shujuDic objectForKey:@"bank_no"],[shujuDic objectForKey:@"ccode"],[shujuDic objectForKey:@"circulation_point"],[shujuDic objectForKey:@"clanguage"],[shujuDic objectForKey:@"diqu"],[shujuDic objectForKey:@"dividend_point"],[shujuDic objectForKey:@"dljj"],[shujuDic objectForKey:@"dquyu"],[shujuDic objectForKey:@"electron_point"],[shujuDic objectForKey:@"email"],[shujuDic objectForKey:@"fxjj"],[shujuDic objectForKey:@"id"],[shujuDic objectForKey:@"jdr"],[shujuDic objectForKey:@"jhb"],[shujuDic objectForKey:@"jscore"],[shujuDic objectForKey:@"keeping_point"],[shujuDic objectForKey:@"left_orders"],[shujuDic objectForKey:@"leftnum"],[shujuDic objectForKey:@"mall_point"],[shujuDic objectForKey:@"name"],[shujuDic objectForKey:@"pno"],[shujuDic objectForKey:@"pnum"],[shujuDic objectForKey:@"pstate"],[shujuDic objectForKey:@"real_name"],[shujuDic objectForKey:@"register_count"],[shujuDic objectForKey:@"register_point"],[shujuDic objectForKey:@"register_type"],[shujuDic objectForKey:@"reward_point"],[shujuDic objectForKey:@"right_orders"],[shujuDic objectForKey:@"rightnum"],[shujuDic objectForKey:@"sky_point"],[shujuDic objectForKey:@"slevel"],[shujuDic objectForKey:@"slevel1"],[shujuDic objectForKey:@"slevelid"],[shujuDic objectForKey:@"sxnum"],[shujuDic objectForKey:@"tc"],[shujuDic objectForKey:@"tc1"],[shujuDic objectForKey:@"tel"],[shujuDic objectForKey:@"tgjj"],[shujuDic objectForKey:@"tjr"],[shujuDic objectForKey:@"wechat"],[shujuDic objectForKey:@"xfje"],[shujuDic objectForKey:@"xwnum"],[shujuDic objectForKey:@"zgq"],[shujuDic objectForKey:@"ztjj"],[shujuDic objectForKey:@"ztnum"],[shujuDic objectForKey:@"zwnum"]]];
                  
                    _idNUM++;
                    
                    //                            if(i == shujuAry.count-1){
                    
                    
                    //                            }
                }
            }
            
        }
        
    }];
    
    
}

-(void)requestZiZhangHuData:(NSDictionary *)qingQiudic{
    NSMutableDictionary *requestData = [[NSMutableDictionary alloc]init];
    
    [requestData setObject:@"act_findzzz" forKey:@"doAction"];
    [requestData setObject:@"" forKey:@"page"];
    [requestData setObject:[qingQiudic objectForKey:@"register_count"] forKey:@"rows"];
    [requestData setObject:[qingQiudic objectForKey:@"pno"] forKey:@"pno"];
    [requestData setObject: [self returnNoNullStrWith:[qingQiudic objectForKey:@"real_name"] andMoRenStr:@""] forKey:@"real_name"];
    [requestData setObject:[self returnNoNullStrWith:[qingQiudic objectForKey:@"tel"] andMoRenStr:@""] forKey:@"tel"];
    [requestData setObject:[self returnNoNullStrWith:[qingQiudic objectForKey:@"pnum"] andMoRenStr:@""] forKey:@"pnum"];
    
//    http://www.sky616.com:81/enjoyLast/manager.php
    [NetWorking NEWjieKouQingQiu:@"enjoyLast/manager.php" ANDIP:@"www.sky616.com:81" And:requestData anBlock:^(NSDictionary *dic, NSError *error) {
        if (!error) {
            
            if (dic != nil) {
                NSArray *ziZhangHuAry = [dic objectForKey:@"rows"];
                for (int i = 0; i < ziZhangHuAry.count; i++) {
                    NSDictionary *ziZhngHUDic = [ziZhangHuAry objectAtIndex:i];
                    [DBDaoHelper updateTableData:[NSString stringWithFormat:@"INSERT OR REPLACE INTO ziZhangHuInfo(fatherID,meID,FatherZZH_type) VALUES('%@','%@','%@')",[qingQiudic objectForKey:@"pno"],[ziZhngHUDic objectForKey:@"pno"],[qingQiudic objectForKey:@"register_type"]]];
                    
//                    NSLog(@"%@的子账户%@插入成功",[qingQiudic objectForKey:@"pno"],[ziZhngHUDic objectForKey:@"pno"]);
                }
                
                
            }
            
        }
//        else{
//            [self requestZiZhangHuData:qingQiudic];
//            
//        }
    }];
}


-(void)requestTjRDATA:(NSDictionary *)shujuDic{
    //请求推荐人为当前用户的用户
    NSMutableDictionary *tuijianRenrequest1 = [[NSMutableDictionary alloc]init];
    [tuijianRenrequest1 setObject:@"act_find" forKey:@"doAction"];
    [tuijianRenrequest1 setObject:@"0" forKey:@"page"];
    [tuijianRenrequest1 setObject:@"2" forKey:@"rows"];
    [tuijianRenrequest1 setObject:@"" forKey:@"clanguage"];
    [tuijianRenrequest1 setObject:@"" forKey:@"real_name"];
    [tuijianRenrequest1 setObject:@"" forKey:@"tc"];
    [tuijianRenrequest1 setObject:@"" forKey:@"end"];
    [tuijianRenrequest1 setObject:@"" forKey:@"start"];
    [tuijianRenrequest1 setObject:@"" forKey:@"tel"];
    [tuijianRenrequest1 setObject:@"" forKey:@"pnum"];
    [tuijianRenrequest1 setObject:@"" forKey:@"name"];
    [tuijianRenrequest1 setObject:[shujuDic objectForKey:@"pno"] forKey:@"jdr"];
    [tuijianRenrequest1 setObject:@"" forKey:@"tjr"];
    [tuijianRenrequest1 setObject:@"" forKey:@"id"];
    [tuijianRenrequest1 setObject:@"" forKey:@"dquyu"];
    
    [NetWorking NEWjieKouQingQiu:@"enjoyLast/manager.php" ANDIP:@"www.sky616.com:81" And:tuijianRenrequest1 anBlock:^(NSDictionary *dic, NSError *error){
        
        if (error != nil) {
            [self request2];
        }else{
            if (dic != nil) {
                
                [self requestZuoYouDanWith:[dic objectForKey:@"rows"] andTJrID:shujuDic];
                
            }
        }
        
        
    }];
    
}

-(void)requestZuoYouDanWith:(NSArray *)zuoYouAry andTJrID:(NSDictionary *)tJRIDIC{
    
    NSMutableDictionary *requestDicww = [[NSMutableDictionary alloc]init];
    [requestDicww setObject:[tJRIDIC objectForKey:@"pno"] forKey:@"pno"];
    [requestDicww setObject:@"act_getAreaUserTree1" forKey:@"doAction"];
    
    [NetWorking NEWjieKouQingQiu:@"enjoyLast/manager.php" ANDIP:@"www.sky616.com:81" And:requestDicww anBlock:^(NSDictionary *dic, NSError *error) {
        
        if (error != nil) {
            [self request2];
        }else{
            
            
            
            if (dic != nil) {
                
                
                NSString *meId = [dic objectForKey:@"queryPer"];
                NSString *ziFuStr = [dic objectForKey:@"tree"];
                NSString *zuodanstr = @"";
                NSString *youDanstr = @"";
                int isZuoYou = 0; //0左 1 右
                
                NSRange meiShuJurange = [ziFuStr rangeOfString:@"btn_wrap"]; //注册位置
                
                
                NSString *zuoId = @"";
                NSString *youId = @"";
                
                for(int i = 0; i < zuoYouAry.count;i++){
                    NSDictionary *dic = [zuoYouAry objectAtIndex:i];
                    
                    
                    NSRange WeiZhi = [ziFuStr rangeOfString:[dic objectForKey:@"pno"]];
                    
                    
                    if(meiShuJurange.length == 0){ //没有注册,左右单都有
                        isZuoYou = i;
                    }else{
                        if(WeiZhi.location > meiShuJurange.location){ //右单
                            isZuoYou = 1;
                        }else{ //左单
                            if(zuoYouAry.count == 1){ //左单
                                isZuoYou = 0;
                            }else{ //左右都有
                                isZuoYou = i;
                            }
                        }
                    }
                    
                    NSArray *zijiyuStr = [ziFuStr componentsSeparatedByString:@"余"];
                    //
                    ////                NSString *benShenZuo = [zijiyuStr firstObject];
                    //
                    zuodanstr = [[[[zijiyuStr firstObject] componentsSeparatedByString:@"<dd>"]lastObject]stringByReplacingOccurrencesOfString:@" " withString:@""];
                    //
                    youDanstr = [[[[zijiyuStr objectAtIndex:1] componentsSeparatedByString:@"</dd>"]firstObject]stringByReplacingOccurrencesOfString:@" " withString:@""];
                    
                    
                    //                NSArray *weiZhiJieQUAry = [ziFuStr componentsSeparatedByString:[dic objectForKey:@"pno"]];
                    //
                    //                NSString *zongShuJUSTr = [weiZhiJieQUAry lastObject];
                    //                NSArray *ddStrAry = [zongShuJUSTr componentsSeparatedByString:@"<dd>"];
                    //
                    //                if (ddStrAry.count >=3) {
                    
                    //                    NSString *yuDanStr = [ddStrAry objectAtIndex:2];
                    //
                    //                    NSArray *yuAry= [yuDanStr componentsSeparatedByString:@"余"];
                    //
                    //                    NSString *youYUJieStr = [yuAry objectAtIndex:1]; //余 右边第一段字符;
                    //
                    //                    NSArray *youYuAry = [youYUJieStr componentsSeparatedByString:@"</dd>"]; //右边yu
                    //
                    //
                    //
                    //                    NSString *zuoyustr = [[yuAry firstObject]stringByReplacingOccurrencesOfString:@" " withString:@""];
                    //                    NSLog(@"左余str:%@",zuoyustr );
                    //                    NSString *youYUstr = [[youYuAry objectAtIndex:0]stringByReplacingOccurrencesOfString:@" " withString:@""];
                    //                    NSLog(@"右余str:%@",youYUstr);
                    
                    
                    if(isZuoYou == 0){
                        zuoId = [dic objectForKey:@"pno"];
                    }else{
                        youId = [dic objectForKey:@"pno"];
                    }
                    //                }
                    
                }
                [DBDaoHelper updateTableData:[NSString stringWithFormat:@"INSERT OR REPLACE INTO guanxibiao(meID,zuoYU,youYU,zuoId,youID) VALUES('%@','%@','%@','%@','%@')",[tJRIDIC objectForKey:@"pno"],zuodanstr,youDanstr,zuoId,youId]];
                chaRuPage ++;
                
                
                if (chaRuPage%1000 == 0) {
                     NSLog(@"成功插入:%d条",chaRuPage);
                }
                
                if ([[tJRIDIC objectForKey:@"register_count"]intValue] > 0) {
                    [self requestZiZhangHuData:tJRIDIC];
                }
                
            }
            
        }
        
      
        
    }];
    
}


-(void)drawView{
    _shouyeView = [[SY_mainView alloc]initWithFrame:CGRectMake(0, -20, KScreenWidth, KScreenHeight - 50)];
    _shouyeView.delegate = self;
    _shouyeView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:_shouyeView];
     _shouyeView.biaoJi = 1;
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(take) name:@"轮播图" object:nil];
    //[TCUtils showLoadingWithView:self.view];
 }
-(void)take{
    [TCUtils hiddonLoadingWithView:self.view];
}
-(void)tiaoZhuan:(FL_ChanPinModel *)row{
    SCHomeViewController *productView = [[SCHomeViewController alloc]init];
     productView.FL_chanPin = row;
     [self.navigationController pushViewController:productView animated:YES];
}
    


#pragma mark 首页viewDelegate
-(void)gongNengBtnClicked:(UIButton *)sender{
//    if ([self jianCeLogin]) {
    switch (sender.tag) {
        case 0:{
            HuaFeiChongZhiViewController * chongZhiView = [[HuaFeiChongZhiViewController alloc]init];
            [self.navigationController pushViewController:chongZhiView animated:YES];
        }
            break;
        case 1:{
            MyPointViewController * jifen = [[MyPointViewController alloc]init];
            [self.navigationController pushViewController:jifen animated:YES];
        }
            break;
        case 2:{
            YygFirstViewController * jifen = [[YygFirstViewController alloc]init];
            [self.navigationController pushViewController:jifen animated:YES];
        }
            break;
        case 3:{
            XXSPMainViewController * xianXiaBtn = [[XXSPMainViewController alloc]init];
            [self.navigationController pushViewController:xianXiaBtn animated:YES];
            
           
        }
            break;
        case 4:{
            FanLiViewController * xianXiaBtn = [[FanLiViewController alloc]init];
            [self.navigationController pushViewController:xianXiaBtn animated:YES];
        }
            break;
        case 5:{
            GuangGaoViewController * fa = [[GuangGaoViewController alloc]init];
            [self.navigationController pushViewController:fa animated:YES];
                }
            break;
        case 6:{
            DLViewController * fa = [[DLViewController alloc]init];
            [self.navigationController pushViewController:fa animated:YES];
        
        }
            break;
        default:{
            YveTXViewController * fa = [[YveTXViewController alloc]init];
            [self.navigationController pushViewController:fa animated:YES];

          
        }
            break;
    }
//    }
}

// 定时器执行的方法

- (void)paint:(NSTimer *)paramTimer{
    
  
    
    
    [self request2];
    
    page ++;
    
}


// 开始定时器

- (void) startPainting{
    
    
    
    // 定义一个NSTimer
    
    self.paintingTimer = [NSTimer scheduledTimerWithTimeInterval:0.8
                          
                                                          target:self
                          
                                                        selector:@selector(paint:)  userInfo:nil
                          
                                                         repeats:YES];
    
    
    
    // 当需要调用时,可以把计时器添加到事件处理循环中
    
    [[NSRunLoop currentRunLoop] addTimer:self.paintingTimer forMode:NSDefaultRunLoopMode];
    

    
}


// 停止定时器

- (void) stopPainting{
    
    if (self.paintingTimer != nil){
        
        // 定时器调用invalidate后，就会自动执行release方法。不需要在显示的调用release方法
        
        [self.paintingTimer invalidate];
        
    }
    
}


- (void)viewDidAppear:(BOOL)animated{
   
//    [self startPainting];// 开始定时器
    
}


- (void)viewDidDisappear:(BOOL)animated{

    [self stopPainting];// 停止定时器
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
